function fn(name:string, hobby:string){
    console.log(`hello ${name},${hobby}${new Date()}YLS`)
}
fn('thc','我爱打水')

interface LabelledValue{
    label: string
}
function printLabel(labelledObj:LabelledValue){
    console.log(labelledObj.label)
}
let obj = {size:10, label: 'thc'}
printLabel(obj)
let lanbam:unknown = 'thc'
let str:string = lanbam as string
let anyValue:number = 3

//tscinfig.json 通过tsc --init命令生成

/*
*   在tsconfig.json中开启了  "strictNullChecks": true, 以下代码会报错
*/
// let strictCheck:string = undefined  
// let stictCheck2:number = null

/**
 *  在tsconfig.json中开启了 "strict": true 或 "noImplicitAny": true, 以下代码会报错
 *  函数的参数需要具体类型
 */
// function Fn(a,b):number{
//     return a+b
// }
// 或者
// let Fn:(a,b)=>number
// Fn = (a,b)=>{
//     return a+b
// }

let arr:number[] = [1]
let arr1:Array<string> = ['thc','cui']